package com.wjd.wshow.entity;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.wjd.wshow.common.resource.ResourceType;

import javax.persistence.Column;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.MappedSuperclass;

@MappedSuperclass
public class ResourceEntity extends BaseEntity {

    /**
     * 资源类型（VIDEO、IMAGE）
     */
    @Column(name = "resource_type")
    @Enumerated(EnumType.STRING)
    private ResourceType resourceType;

    /**
     * 资源名称（文件名称）
     */
    @Column(name = "name")
    private String name;

    /**
     * 资源内容类型（video/map4、image/png）
     */
    @Column(name = "type")
    protected String type;

    /**
     * 资源路径（相对路径）
     */
    @JsonIgnore
    @Column(name = "path")
    protected String path;

    public ResourceType getResourceType() {
        return resourceType;
    }

    public void setResourceType(ResourceType resourceType) {
        this.resourceType = resourceType;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getPath() {
        return path;
    }

    public void setPath(String path) {
        this.path = path;
    }

}
